<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
  <div v-if="count==1">div1</div>
  <div v-else-if="count==2">div2</div>
  <div v-else>div3</div>
  <div v-show="count==4">div4</div>
  <input v-model="count">
</div>
<script src="../js/vue.js"></script><!--引入vue.js-->
<script>
  //创建Vue核心对象
  new Vue({
    el:"#app",  //指定受管理的标签
    data(){ //定义数据模型
      return{
        username:"",
        url:"http://www.baidu.com",
        count:3/*count初始化值为3*/
      }
    }
  });
</script>
</body>
</html>